{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "certain-rapid",
   "metadata": {},
   "source": [
    "# part0: imports"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "convinced-tracy",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/jcc319/anaconda3/envs/multi-animal-alignment/lib/python3.10/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n"
     ]
    }
   ],
   "source": [
    "import os, sys, pathlib\n",
    "from pprint import pprint \n",
    "from importlib import reload\n",
    "import logging\n",
    "from typing import Callable\n",
    "import warnings\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import xarray as xr\n",
    "from sklearn.decomposition import PCA\n",
    "import scipy.linalg as linalg\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.cm as cm\n",
    "import matplotlib\n",
    "from matplotlib.ticker import MaxNLocator\n",
    "\n",
    "\n",
    "import pyaldata as pyal\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "try:\n",
    "    nbPath = pathlib.Path.cwd()\n",
    "    RepoPath = nbPath.parent\n",
    "    os.chdir(RepoPath)\n",
    "\n",
    "    from tools import utilityTools as utility\n",
    "    from tools import dataTools as dt\n",
    "    import params\n",
    "    defs = params.random_walk_defs\n",
    "    \n",
    "    set_rc =  params.set_rc_params\n",
    "    root = params.root\n",
    "\n",
    "finally:\n",
    "    os.chdir(nbPath)\n",
    "\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "industrial-think",
   "metadata": {},
   "source": [
    "#### Print the summary of all the datassets\n",
    "\n",
    "check out the results [here](https://github.com/AtMostafa/notebook/blob/main/2021-cca-project/dataset-summary.md)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "entire-rachel",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_VR_2013-12-13.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_VR_2013-10-11.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_FF_2013-12-09.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_FF_2013-12-18.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_FF_2013-12-17.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_VR_2013-12-12.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_FF_2013-10-28.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_FF_2013-12-10.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_VR_2013-10-10.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_CS_2016-10-21.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_FF_2013-10-29.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_VR_2013-10-09.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Mihili/Mihili_RT_VR_2014-01-15.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Mihili/Mihili_RT_FF_2014-02-14.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Mihili/Mihili_RT_FF_2014-02-24.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Mihili/Mihili_RT_FF_2014-02-21.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Mihili/Mihili_RT_VR_2014-01-16.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/Mihili/Mihili_RT_VR_2014-01-14.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/MrT/MrT_RT_FF_2013-08-22.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/MrT/MrT_RT_VR_2013-09-04.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/MrT/MrT_RT_VR_2013-09-06.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/MrT/MrT_RT_VR_2013-09-10.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/MrT/MrT_RT_FF_2013-08-30.mat', '/home/jcc319/multi_animal_alignment/data/random_walk/MrT/MrT_RT_FF_2013-08-20.mat']\n"
     ]
    }
   ],
   "source": [
    "datadir = root/'random_walk'\n",
    "_AllAnimalList = ['Chewie', 'Mihili', \"MrT\"]\n",
    "\n",
    "_AllAnimalFiles=[]\n",
    "for animal in _AllAnimalList:\n",
    "    _AllAnimalFiles.extend(utility.find_file(datadir / animal, 'mat'))\n",
    "# print(_AllAnimalFiles)\n",
    "\n",
    "#don't include these sessions since the targets are incorrect\n",
    "incorrect_target_files = [\"Chewie_RT_FF_2013-10-28.mat\", \"Chewie_RT_VR_2013-12-12.mat\", \"MrT_RT_VR_2013-09-06.mat\", \"MrT_RT_VR_2013-09-04.mat\"]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "19260b22",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>monkey</th>\n",
       "      <th>date</th>\n",
       "      <th>task</th>\n",
       "      <th>target_center</th>\n",
       "      <th>trial_id</th>\n",
       "      <th>result</th>\n",
       "      <th>bin_size</th>\n",
       "      <th>perturbation</th>\n",
       "      <th>epoch</th>\n",
       "      <th>idx_trial_start</th>\n",
       "      <th>idx_trial_end</th>\n",
       "      <th>idx_go_cue</th>\n",
       "      <th>pos</th>\n",
       "      <th>vel</th>\n",
       "      <th>acc</th>\n",
       "      <th>force</th>\n",
       "      <th>M1_spikes</th>\n",
       "      <th>M1_unit_guide</th>\n",
       "      <th>PMd_spikes</th>\n",
       "      <th>PMd_unit_guide</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>10-21-2016</td>\n",
       "      <td>RT</td>\n",
       "      <td>[[-3.697366714477539, 1.5944132804870605], [1....</td>\n",
       "      <td>2</td>\n",
       "      <td>R</td>\n",
       "      <td>0.01</td>\n",
       "      <td>CS</td>\n",
       "      <td>BL</td>\n",
       "      <td>9</td>\n",
       "      <td>336</td>\n",
       "      <td>[19, 115, 216, 273]</td>\n",
       "      <td>[[-1.6233934029665136, -29.806833037805866], [...</td>\n",
       "      <td>[[9.502502328629195, -4.945520265504228], [9.3...</td>\n",
       "      <td>[[-14.140230801614209, 21.55262261762753], [-2...</td>\n",
       "      <td>[[-0.7399081463540637, 0.3927892477849265], [-...</td>\n",
       "      <td>[[0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,...</td>\n",
       "      <td>[[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...</td>\n",
       "      <td>[[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>10-21-2016</td>\n",
       "      <td>RT</td>\n",
       "      <td>[[7.688087463378906, -1.52504301071167], [-2.4...</td>\n",
       "      <td>3</td>\n",
       "      <td>R</td>\n",
       "      <td>0.01</td>\n",
       "      <td>CS</td>\n",
       "      <td>BL</td>\n",
       "      <td>9</td>\n",
       "      <td>392</td>\n",
       "      <td>[19, 108, 198, 313]</td>\n",
       "      <td>[[-0.4807024337198271, -31.617166918356368], [...</td>\n",
       "      <td>[[0.5519463229445638, 3.3281165520009637], [1....</td>\n",
       "      <td>[[75.58603471382368, -25.976122087577867], [60...</td>\n",
       "      <td>[[-0.8368291181572973, 0.224127084643247], [-0...</td>\n",
       "      <td>[[0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...</td>\n",
       "      <td>[[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>10-21-2016</td>\n",
       "      <td>RT</td>\n",
       "      <td>[[3.5938963890075684, -0.6197371482849121], [4...</td>\n",
       "      <td>4</td>\n",
       "      <td>R</td>\n",
       "      <td>0.01</td>\n",
       "      <td>CS</td>\n",
       "      <td>BL</td>\n",
       "      <td>9</td>\n",
       "      <td>354</td>\n",
       "      <td>[19, 115, 212, 286]</td>\n",
       "      <td>[[0.14076750167513552, -31.49352615706792], [0...</td>\n",
       "      <td>[[8.638733219602209, -0.0003180894720955575], ...</td>\n",
       "      <td>[[-24.050014222513006, 51.04746734448047], [-4...</td>\n",
       "      <td>[[-0.9655852790529066, 0.43527411755384016], [...</td>\n",
       "      <td>[[0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...</td>\n",
       "      <td>[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>10-21-2016</td>\n",
       "      <td>RT</td>\n",
       "      <td>[[-6.889117240905762, -2.445563316345215], [-3...</td>\n",
       "      <td>5</td>\n",
       "      <td>R</td>\n",
       "      <td>0.01</td>\n",
       "      <td>CS</td>\n",
       "      <td>BL</td>\n",
       "      <td>9</td>\n",
       "      <td>368</td>\n",
       "      <td>[19, 107, 177, 253]</td>\n",
       "      <td>[[0.870940673116614, -31.41725949904925], [0.9...</td>\n",
       "      <td>[[5.21897587142075, -6.338590565622717], [4.49...</td>\n",
       "      <td>[[-71.05251288246204, 24.490942527687388], [-6...</td>\n",
       "      <td>[[-0.892147276176141, 0.4266238142730099], [-0...</td>\n",
       "      <td>[[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,...</td>\n",
       "      <td>[[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...</td>\n",
       "      <td>[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>10-21-2016</td>\n",
       "      <td>RT</td>\n",
       "      <td>[[-3.336542844772339, 4.224082946777344], [2.7...</td>\n",
       "      <td>6</td>\n",
       "      <td>R</td>\n",
       "      <td>0.01</td>\n",
       "      <td>CS</td>\n",
       "      <td>BL</td>\n",
       "      <td>9</td>\n",
       "      <td>428</td>\n",
       "      <td>[19, 153, 238, 339]</td>\n",
       "      <td>[[-0.476625434088497, -30.572590053413172], [-...</td>\n",
       "      <td>[[9.122018466739428, -8.087344962504512], [8.9...</td>\n",
       "      <td>[[-10.639360988263086, 29.877631075622283], [-...</td>\n",
       "      <td>[[-0.7295447313649992, 0.3667958069673153], [-...</td>\n",
       "      <td>[[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,...</td>\n",
       "      <td>[[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...</td>\n",
       "      <td>[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...</td>\n",
       "      <td>[[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   monkey        date task                                      target_center  \\\n",
       "0  Chewie  10-21-2016   RT  [[-3.697366714477539, 1.5944132804870605], [1....   \n",
       "1  Chewie  10-21-2016   RT  [[7.688087463378906, -1.52504301071167], [-2.4...   \n",
       "2  Chewie  10-21-2016   RT  [[3.5938963890075684, -0.6197371482849121], [4...   \n",
       "3  Chewie  10-21-2016   RT  [[-6.889117240905762, -2.445563316345215], [-3...   \n",
       "4  Chewie  10-21-2016   RT  [[-3.336542844772339, 4.224082946777344], [2.7...   \n",
       "\n",
       "   trial_id result  bin_size perturbation epoch  idx_trial_start  \\\n",
       "0         2      R      0.01           CS    BL                9   \n",
       "1         3      R      0.01           CS    BL                9   \n",
       "2         4      R      0.01           CS    BL                9   \n",
       "3         5      R      0.01           CS    BL                9   \n",
       "4         6      R      0.01           CS    BL                9   \n",
       "\n",
       "   idx_trial_end           idx_go_cue  \\\n",
       "0            336  [19, 115, 216, 273]   \n",
       "1            392  [19, 108, 198, 313]   \n",
       "2            354  [19, 115, 212, 286]   \n",
       "3            368  [19, 107, 177, 253]   \n",
       "4            428  [19, 153, 238, 339]   \n",
       "\n",
       "                                                 pos  \\\n",
       "0  [[-1.6233934029665136, -29.806833037805866], [...   \n",
       "1  [[-0.4807024337198271, -31.617166918356368], [...   \n",
       "2  [[0.14076750167513552, -31.49352615706792], [0...   \n",
       "3  [[0.870940673116614, -31.41725949904925], [0.9...   \n",
       "4  [[-0.476625434088497, -30.572590053413172], [-...   \n",
       "\n",
       "                                                 vel  \\\n",
       "0  [[9.502502328629195, -4.945520265504228], [9.3...   \n",
       "1  [[0.5519463229445638, 3.3281165520009637], [1....   \n",
       "2  [[8.638733219602209, -0.0003180894720955575], ...   \n",
       "3  [[5.21897587142075, -6.338590565622717], [4.49...   \n",
       "4  [[9.122018466739428, -8.087344962504512], [8.9...   \n",
       "\n",
       "                                                 acc  \\\n",
       "0  [[-14.140230801614209, 21.55262261762753], [-2...   \n",
       "1  [[75.58603471382368, -25.976122087577867], [60...   \n",
       "2  [[-24.050014222513006, 51.04746734448047], [-4...   \n",
       "3  [[-71.05251288246204, 24.490942527687388], [-6...   \n",
       "4  [[-10.639360988263086, 29.877631075622283], [-...   \n",
       "\n",
       "                                               force  \\\n",
       "0  [[-0.7399081463540637, 0.3927892477849265], [-...   \n",
       "1  [[-0.8368291181572973, 0.224127084643247], [-0...   \n",
       "2  [[-0.9655852790529066, 0.43527411755384016], [...   \n",
       "3  [[-0.892147276176141, 0.4266238142730099], [-0...   \n",
       "4  [[-0.7295447313649992, 0.3667958069673153], [-...   \n",
       "\n",
       "                                           M1_spikes  \\\n",
       "0  [[0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,...   \n",
       "1  [[0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...   \n",
       "2  [[0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,...   \n",
       "3  [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,...   \n",
       "4  [[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,...   \n",
       "\n",
       "                                       M1_unit_guide  \\\n",
       "0  [[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...   \n",
       "1  [[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...   \n",
       "2  [[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...   \n",
       "3  [[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...   \n",
       "4  [[1, 1], [1, 2], [3, 1], [5, 1], [5, 2], [7, 1...   \n",
       "\n",
       "                                          PMd_spikes  \\\n",
       "0  [[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,...   \n",
       "1  [[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,...   \n",
       "2  [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,...   \n",
       "3  [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...   \n",
       "4  [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...   \n",
       "\n",
       "                                      PMd_unit_guide  \n",
       "0  [[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...  \n",
       "1  [[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...  \n",
       "2  [[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...  \n",
       "3  [[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...  \n",
       "4  [[1, 1], [1, 2], [1, 3], [4, 1], [4, 2], [5, 1...  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "raw_df = pyal.mat2dataframe('/home/jcc319/multi_animal_alignment/data/random_walk/Chewie/Chewie_RT_CS_2016-10-21.mat', shift_idx_fields=True)\n",
    "raw_df.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "e08a2890",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>animal</th>\n",
       "      <th>file</th>\n",
       "      <th>areas</th>\n",
       "      <th>trials_all</th>\n",
       "      <th>trials_left</th>\n",
       "      <th>neurons_all</th>\n",
       "      <th>neurons_left</th>\n",
       "      <th>MCx_neurons_all</th>\n",
       "      <th>MCx_neurons_left</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_VR_2013-12-13.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>486</td>\n",
       "      <td>157</td>\n",
       "      <td>[67]</td>\n",
       "      <td>[54]</td>\n",
       "      <td>67</td>\n",
       "      <td>54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_VR_2013-10-11.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>509</td>\n",
       "      <td>134</td>\n",
       "      <td>[88]</td>\n",
       "      <td>[65]</td>\n",
       "      <td>88</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_FF_2013-12-09.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>529</td>\n",
       "      <td>148</td>\n",
       "      <td>[65]</td>\n",
       "      <td>[48]</td>\n",
       "      <td>65</td>\n",
       "      <td>48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_FF_2013-12-18.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>588</td>\n",
       "      <td>154</td>\n",
       "      <td>[62]</td>\n",
       "      <td>[53]</td>\n",
       "      <td>62</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_FF_2013-12-17.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>634</td>\n",
       "      <td>157</td>\n",
       "      <td>[57]</td>\n",
       "      <td>[45]</td>\n",
       "      <td>57</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_FF_2013-12-10.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>628</td>\n",
       "      <td>159</td>\n",
       "      <td>[63]</td>\n",
       "      <td>[42]</td>\n",
       "      <td>63</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_VR_2013-10-10.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>577</td>\n",
       "      <td>147</td>\n",
       "      <td>[74]</td>\n",
       "      <td>[31]</td>\n",
       "      <td>74</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_CS_2016-10-21.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>291</td>\n",
       "      <td>288</td>\n",
       "      <td>[84, 211]</td>\n",
       "      <td>[84, 196, 280]</td>\n",
       "      <td>295</td>\n",
       "      <td>280</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_FF_2013-10-29.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>592</td>\n",
       "      <td>144</td>\n",
       "      <td>[67]</td>\n",
       "      <td>[37]</td>\n",
       "      <td>67</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Chewie</td>\n",
       "      <td>Chewie_RT_VR_2013-10-09.mat</td>\n",
       "      <td>[M1_spikes]</td>\n",
       "      <td>423</td>\n",
       "      <td>133</td>\n",
       "      <td>[74]</td>\n",
       "      <td>[65]</td>\n",
       "      <td>74</td>\n",
       "      <td>65</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Mihili</td>\n",
       "      <td>Mihili_RT_VR_2014-01-15.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>613</td>\n",
       "      <td>193</td>\n",
       "      <td>[70, 93]</td>\n",
       "      <td>[70, 77, 147]</td>\n",
       "      <td>163</td>\n",
       "      <td>147</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Mihili</td>\n",
       "      <td>Mihili_RT_FF_2014-02-14.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>741</td>\n",
       "      <td>160</td>\n",
       "      <td>[22, 94]</td>\n",
       "      <td>[22, 80, 102]</td>\n",
       "      <td>116</td>\n",
       "      <td>102</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>Mihili</td>\n",
       "      <td>Mihili_RT_FF_2014-02-24.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>837</td>\n",
       "      <td>146</td>\n",
       "      <td>[32, 89]</td>\n",
       "      <td>[32, 69, 101]</td>\n",
       "      <td>121</td>\n",
       "      <td>101</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>Mihili</td>\n",
       "      <td>Mihili_RT_FF_2014-02-21.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>712</td>\n",
       "      <td>162</td>\n",
       "      <td>[32, 95]</td>\n",
       "      <td>[32, 87, 119]</td>\n",
       "      <td>127</td>\n",
       "      <td>119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>Mihili</td>\n",
       "      <td>Mihili_RT_VR_2014-01-16.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>603</td>\n",
       "      <td>139</td>\n",
       "      <td>[67, 93]</td>\n",
       "      <td>[67, 86, 153]</td>\n",
       "      <td>160</td>\n",
       "      <td>153</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>Mihili</td>\n",
       "      <td>Mihili_RT_VR_2014-01-14.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>757</td>\n",
       "      <td>173</td>\n",
       "      <td>[59, 105]</td>\n",
       "      <td>[59, 78, 137]</td>\n",
       "      <td>164</td>\n",
       "      <td>137</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>MrT</td>\n",
       "      <td>MrT_RT_FF_2013-08-22.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>712</td>\n",
       "      <td>190</td>\n",
       "      <td>[8, 56]</td>\n",
       "      <td>[8, 50, 58]</td>\n",
       "      <td>64</td>\n",
       "      <td>58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>MrT</td>\n",
       "      <td>MrT_RT_VR_2013-09-10.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>657</td>\n",
       "      <td>174</td>\n",
       "      <td>[6, 63]</td>\n",
       "      <td>[6, 60, 66]</td>\n",
       "      <td>69</td>\n",
       "      <td>66</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>MrT</td>\n",
       "      <td>MrT_RT_FF_2013-08-30.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>511</td>\n",
       "      <td>145</td>\n",
       "      <td>[3, 33]</td>\n",
       "      <td>[3, 27, 30]</td>\n",
       "      <td>36</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>MrT</td>\n",
       "      <td>MrT_RT_FF_2013-08-20.mat</td>\n",
       "      <td>[M1_spikes, PMd_spikes]</td>\n",
       "      <td>638</td>\n",
       "      <td>125</td>\n",
       "      <td>[10, 44]</td>\n",
       "      <td>[10, 33, 43]</td>\n",
       "      <td>54</td>\n",
       "      <td>43</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    animal                         file                    areas  trials_all  \\\n",
       "0   Chewie  Chewie_RT_VR_2013-12-13.mat              [M1_spikes]         486   \n",
       "1   Chewie  Chewie_RT_VR_2013-10-11.mat              [M1_spikes]         509   \n",
       "2   Chewie  Chewie_RT_FF_2013-12-09.mat              [M1_spikes]         529   \n",
       "3   Chewie  Chewie_RT_FF_2013-12-18.mat              [M1_spikes]         588   \n",
       "4   Chewie  Chewie_RT_FF_2013-12-17.mat              [M1_spikes]         634   \n",
       "5   Chewie  Chewie_RT_FF_2013-12-10.mat              [M1_spikes]         628   \n",
       "6   Chewie  Chewie_RT_VR_2013-10-10.mat              [M1_spikes]         577   \n",
       "7   Chewie  Chewie_RT_CS_2016-10-21.mat  [M1_spikes, PMd_spikes]         291   \n",
       "8   Chewie  Chewie_RT_FF_2013-10-29.mat              [M1_spikes]         592   \n",
       "9   Chewie  Chewie_RT_VR_2013-10-09.mat              [M1_spikes]         423   \n",
       "10  Mihili  Mihili_RT_VR_2014-01-15.mat  [M1_spikes, PMd_spikes]         613   \n",
       "11  Mihili  Mihili_RT_FF_2014-02-14.mat  [M1_spikes, PMd_spikes]         741   \n",
       "12  Mihili  Mihili_RT_FF_2014-02-24.mat  [M1_spikes, PMd_spikes]         837   \n",
       "13  Mihili  Mihili_RT_FF_2014-02-21.mat  [M1_spikes, PMd_spikes]         712   \n",
       "14  Mihili  Mihili_RT_VR_2014-01-16.mat  [M1_spikes, PMd_spikes]         603   \n",
       "15  Mihili  Mihili_RT_VR_2014-01-14.mat  [M1_spikes, PMd_spikes]         757   \n",
       "16     MrT     MrT_RT_FF_2013-08-22.mat  [M1_spikes, PMd_spikes]         712   \n",
       "17     MrT     MrT_RT_VR_2013-09-10.mat  [M1_spikes, PMd_spikes]         657   \n",
       "18     MrT     MrT_RT_FF_2013-08-30.mat  [M1_spikes, PMd_spikes]         511   \n",
       "19     MrT     MrT_RT_FF_2013-08-20.mat  [M1_spikes, PMd_spikes]         638   \n",
       "\n",
       "    trials_left neurons_all    neurons_left  MCx_neurons_all  MCx_neurons_left  \n",
       "0           157        [67]            [54]               67                54  \n",
       "1           134        [88]            [65]               88                65  \n",
       "2           148        [65]            [48]               65                48  \n",
       "3           154        [62]            [53]               62                53  \n",
       "4           157        [57]            [45]               57                45  \n",
       "5           159        [63]            [42]               63                42  \n",
       "6           147        [74]            [31]               74                31  \n",
       "7           288   [84, 211]  [84, 196, 280]              295               280  \n",
       "8           144        [67]            [37]               67                37  \n",
       "9           133        [74]            [65]               74                65  \n",
       "10          193    [70, 93]   [70, 77, 147]              163               147  \n",
       "11          160    [22, 94]   [22, 80, 102]              116               102  \n",
       "12          146    [32, 89]   [32, 69, 101]              121               101  \n",
       "13          162    [32, 95]   [32, 87, 119]              127               119  \n",
       "14          139    [67, 93]   [67, 86, 153]              160               153  \n",
       "15          173   [59, 105]   [59, 78, 137]              164               137  \n",
       "16          190     [8, 56]     [8, 50, 58]               64                58  \n",
       "17          174     [6, 63]     [6, 60, 66]               69                66  \n",
       "18          145     [3, 33]     [3, 27, 30]               36                30  \n",
       "19          125    [10, 44]    [10, 33, 43]               54                43  "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rows = []\n",
    "for file in _AllAnimalFiles:\n",
    "    if file.split(os.sep)[-1] in incorrect_target_files:\n",
    "        # print(file)\n",
    "        continue\n",
    "    raw_df = pyal.mat2dataframe(file, shift_idx_fields=True)\n",
    "    df = defs.prep_general(raw_df)\n",
    "\n",
    "    dic = {\n",
    "        'animal': file.split(os.sep)[-2],\n",
    "        'file': file.split(os.sep)[-1],\n",
    "        'areas': [x for x in list(raw_df.columns) if '_spikes' in x],\n",
    "        'trials_all': len(raw_df),\n",
    "        'trials_left': len(df),\n",
    "        'neurons_all': [raw_df[x][0].shape[1] for x in list(raw_df.columns) if '_spikes' in x],\n",
    "        'neurons_left': [df[x][0].shape[1] for x in list(df.columns) if '_spikes' in x],\n",
    "        'MCx_neurons_all': sum([raw_df[x][0].shape[1] for x in list(raw_df.columns) if '_spikes' in x]),\n",
    "        'MCx_neurons_left': df['MCx_spikes'][0].shape[1] \n",
    "\n",
    "    }\n",
    "    rows.append(dic)\n",
    "\n",
    "summary = pd.DataFrame(rows)\n",
    "summary\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "6951690e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mean</th>\n",
       "      <th>sem</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>animal</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Chewie</th>\n",
       "      <td>72.00</td>\n",
       "      <td>23.370922</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mihili</th>\n",
       "      <td>126.50</td>\n",
       "      <td>9.200543</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MrT</th>\n",
       "      <td>49.25</td>\n",
       "      <td>7.993487</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          mean        sem\n",
       "animal                   \n",
       "Chewie   72.00  23.370922\n",
       "Mihili  126.50   9.200543\n",
       "MrT      49.25   7.993487"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "summary.groupby('animal')['MCx_neurons_left'].agg(['mean', 'sem'])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "departmental-hands",
   "metadata": {},
   "source": [
    "Categories I want to separate:\n",
    "\n",
    "- sessions with 2 areas, similar number of neurons each, as many monkeys as possible!\n",
    "- 3 sessions for each area (M1, PMd, S1), most number of neurons"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "prescription-algorithm",
   "metadata": {},
   "outputs": [],
   "source": [
    "_AllAnimalFiles= [path.split(os.sep)[-1] for path in _AllAnimalFiles]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "b8385373",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_AllAnimalFiles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "97167050",
   "metadata": {},
   "outputs": [
    {
     "ename": "AttributeError",
     "evalue": "'DataFrame' object has no attribute 'areas'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mAttributeError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[1;32m/home/jcc319/multi_animal_alignment/random_walk/_dataset-selection.ipynb Cell 8\u001b[0m in \u001b[0;36m<cell line: 1>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> <a href='vscode-notebook-cell://ssh-remote%2B129.31.68.226/home/jcc319/multi_animal_alignment/random_walk/_dataset-selection.ipynb#X11sdnNjb2RlLXJlbW90ZQ%3D%3D?line=0'>1</a>\u001b[0m summary\u001b[39m.\u001b[39;49mareas\n",
      "File \u001b[0;32m~/anaconda3/envs/multi-animal-alignment/lib/python3.10/site-packages/pandas/core/generic.py:5583\u001b[0m, in \u001b[0;36mNDFrame.__getattr__\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m   5576\u001b[0m \u001b[39mif\u001b[39;00m (\n\u001b[1;32m   5577\u001b[0m     name \u001b[39mnot\u001b[39;00m \u001b[39min\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_internal_names_set\n\u001b[1;32m   5578\u001b[0m     \u001b[39mand\u001b[39;00m name \u001b[39mnot\u001b[39;00m \u001b[39min\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_metadata\n\u001b[1;32m   5579\u001b[0m     \u001b[39mand\u001b[39;00m name \u001b[39mnot\u001b[39;00m \u001b[39min\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_accessors\n\u001b[1;32m   5580\u001b[0m     \u001b[39mand\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_info_axis\u001b[39m.\u001b[39m_can_hold_identifiers_and_holds_name(name)\n\u001b[1;32m   5581\u001b[0m ):\n\u001b[1;32m   5582\u001b[0m     \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m[name]\n\u001b[0;32m-> 5583\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mobject\u001b[39;49m\u001b[39m.\u001b[39;49m\u001b[39m__getattribute__\u001b[39;49m(\u001b[39mself\u001b[39;49m, name)\n",
      "\u001b[0;31mAttributeError\u001b[0m: 'DataFrame' object has no attribute 'areas'"
     ]
    }
   ],
   "source": [
    "summary.areas"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "multiple-dialogue",
   "metadata": {},
   "source": [
    "The code above relies on the host PC having the exact fiels as my laptop.  \n",
    "So I replace the values below for reliability."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "grave-quarterly",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'M1': {'Chewie': array(['Chewie_RT_VR_2013-12-13.mat', 'Chewie_RT_VR_2013-10-11.mat',\n",
       "         'Chewie_RT_FF_2013-12-09.mat', 'Chewie_RT_FF_2013-12-18.mat',\n",
       "         'Chewie_RT_FF_2013-12-17.mat', 'Chewie_RT_VR_2013-12-12.mat',\n",
       "         'Chewie_RT_FF_2013-10-28.mat', 'Chewie_RT_FF_2013-12-10.mat',\n",
       "         'Chewie_RT_VR_2013-10-10.mat', 'Chewie_RT_CS_2016-10-21.mat',\n",
       "         'Chewie_RT_FF_2013-10-29.mat', 'Chewie_RT_VR_2013-10-09.mat'],\n",
       "        dtype=object),\n",
       "  'Mihili': array(['Mihili_RT_VR_2014-01-15.mat', 'Mihili_RT_FF_2014-02-14.mat',\n",
       "         'Mihili_RT_FF_2014-02-24.mat', 'Mihili_RT_FF_2014-02-21.mat',\n",
       "         'Mihili_RT_VR_2014-01-16.mat', 'Mihili_RT_VR_2014-01-14.mat'],\n",
       "        dtype=object),\n",
       "  'MrT': array(['MrT_RT_FF_2013-08-22.mat', 'MrT_RT_VR_2013-09-04.mat',\n",
       "         'MrT_RT_VR_2013-09-06.mat', 'MrT_RT_VR_2013-09-10.mat',\n",
       "         'MrT_RT_FF_2013-08-30.mat', 'MrT_RT_FF_2013-08-20.mat'],\n",
       "        dtype=object)},\n",
       " 'PMd': {'Chewie': array(['Chewie_RT_CS_2016-10-21.mat'], dtype=object),\n",
       "  'Mihili': array(['Mihili_RT_VR_2014-01-15.mat', 'Mihili_RT_FF_2014-02-14.mat',\n",
       "         'Mihili_RT_FF_2014-02-24.mat', 'Mihili_RT_FF_2014-02-21.mat',\n",
       "         'Mihili_RT_VR_2014-01-16.mat', 'Mihili_RT_VR_2014-01-14.mat'],\n",
       "        dtype=object),\n",
       "  'MrT': array(['MrT_RT_FF_2013-08-22.mat', 'MrT_RT_VR_2013-09-04.mat',\n",
       "         'MrT_RT_VR_2013-09-06.mat', 'MrT_RT_VR_2013-09-10.mat',\n",
       "         'MrT_RT_FF_2013-08-30.mat', 'MrT_RT_FF_2013-08-20.mat'],\n",
       "        dtype=object)}}"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "GoodDataList_RW = {'M1':{}, 'PMd':{}}\n",
    "#-----------------------------------\n",
    "\n",
    "for area in ['M1', 'PMd']:\n",
    "    for animal in ['Chewie', 'Mihili', 'MrT']:\n",
    "        area_idx = [area+'_spikes' in x for x in summary.areas]\n",
    "        files = summary[area_idx & (summary.animal == animal)].file.values\n",
    "        GoodDataList_RW[area][animal] = files\n",
    "\n",
    "GoodDataList_RW"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "60af89cc-d68b-4823-b866-15ac66df92c7",
   "metadata": {},
   "source": [
    "Adding the aggregate of *M1* and *PMd* as **MCx**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "dc8b2ec9-49d9-4ec0-9834-7239dadb4b14",
   "metadata": {},
   "outputs": [],
   "source": [
    "MCx = {}\n",
    "for area in ['M1', 'PMd']:\n",
    "    for animal in GoodDataList_RW[area]:\n",
    "        if animal not in MCx:\n",
    "            MCx[animal] = []\n",
    "        MCx[animal].extend(GoodDataList_RW[area][animal])\n",
    "        MCx[animal] = list(set(MCx[animal]))\n",
    "\n",
    "GoodDataList_RW['MCx'] = MCx"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.10.4 ('multi-animal-alignment': conda)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.4"
  },
  "vscode": {
   "interpreter": {
    "hash": "3309cafff73c0e1b7d4ee783dd1761b4f3e1a0460f267e123bc4271c9446dbba"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
